package cn.sdormitory.service;

import cn.sdormitory.basedata.entity.BStudent;
import cn.sdormitory.basedata.vo.BStudentAppHyInfoVo;
import cn.sdormitory.basedata.vo.BStudentAppHyVo;
import cn.sdormitory.basedata.vo.BStudentAppInfoVo;
import cn.sdormitory.basedata.vo.BStudentAppVo;
import cn.sdormitory.controller.forms.FilterStudentQueryForm;
import cn.sdormitory.controller.vos.FilterStudentVo;
import cn.sdormitory.leavingSchool.vo.LeavingSchoolCertificateVO;
import cn.sdormitory.sys.vo.LoginInfoVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.security.core.userdetails.UserDetails;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @创建人：zhouyang
 * @创建时间：2020/12/28 11:07
 * @version：V1.0
 */
public interface AppStudentService {
    Page<FilterStudentVo> getFilterStudentPage(FilterStudentQueryForm form);

    BStudent getStudentById(int id);

    boolean updateStuPassword(int id , String oldPassword , String newPassword);

    boolean updateParPassword(int id , String oldPassword , String newPassword);

    BStudent getByStudentNo(String studentNo);

    BStudent getByStuNoAndNameAndClassId(String studentNo,String studentName,Long classId);

    List<BStudentAppVo> getAppBStudentByDormitoryId(Long dormitoryId,String accessDate);

    int getAppBStudentCount(Long dormitoryId,String accessDate);

    List<BStudentAppVo> getAppBStudentByDormitoryIdNo(Long dormitoryId,String accessDate);

    int getAppBStudentCountById(String studentNo,String accessDate);

    List<BStudentAppInfoVo> getAppStuInfoById(String studentNo,String accessDate);

    List<BStudentAppInfoVo> getAppStuInfoByIdNo(String studentNo,String accessDate);

    int getAppBStuHyCount(Long dormitoryId,String checkDate);

    List<BStudentAppHyVo> getAppBStuHyByDormitoryId(Long dormitoryId,String checkDate);

    List<BStudentAppHyVo> getAppBStuHyByDormitoryIdNo(Long dormitoryId);

    int getAppBStuHyCountById(String studentNo,String checkDate);

    List<BStudentAppHyInfoVo> getAppStuHyInfoById(String studentNo,String checkDate);

    List<BStudentAppHyInfoVo> getAppStuHyInfoByIdNo(String studentNo);

    /**
     * 根据宿舍id查询当前宿舍学生列表
     * @param dormitoryId
     * @return
     */
    List<BStudent> getStudentByDormitoryId(Long dormitoryId);

    /**
     * 学生登录
     * @param loginName 学生手机号码
     * @param request
     * @return
     */
    String login(String loginName, HttpServletRequest request);

    /**
     * 查询登录学生信息
     * @param loginName
     * @return
     */
    LoginInfoVo getLoginInfo(String loginName);

    UserDetails loadStudentInfoByPhone(String username);

    /**
     * 重置学生密码
     * @param map
     * @return
     */
    int resetPwd(Map<String, String> map);


    LeavingSchoolCertificateVO getLeavingSchoolCertificate(Long studentId);
	
    /**
     * 批量获取学生信息
     * @author alex
     * @param: studentNos
     * @date 2024/11/12 15:17
     * @return
     */
	List<BStudent> getStudentsByStudentNos(List<String> studentNos);
}
